package com.example.dao;

import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;

public class LoginDao {
	DBHelper dbHelper;

	public LoginDao(Context context) {
		dbHelper = new DBHelper(context);
	}

	public Cursor login(String name, String pass) {
		SQLiteDatabase db = dbHelper.getReadableDatabase();
		Cursor cursor = db.query("people", new String[] { "name", "pwd" },
				"name=? and pwd=?", new String[] { name, pass }, null, null,
				null, null);
		return cursor;
	}

}
